home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 44
/
Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso
/
-in_the_mag-
/
basics
/
amigabasic
/
wartrans.lha
/
bin->hex
next >
Wrap
Text File
|
1998-02-27
|
356b
|
19 lines
INPUT "Enter FileName to Convert: ",OldFile$
OPEN OldFile$ FOR INPUT AS #1
INPUT "Enter Filname to Create: ",NewFile$
OPEN NewFile$ FOR OUTPUT AS #2
EntireFile$ = INPUT$(LOF(1),#1)
FOR I = 1 TO LOF(1)
A$ = HEX$(ASC(RIGHT$(LEFT$(EntireFile$,I),1)))
IF LEN(A$) = 1 THEN
B$ = "0"
PRINT #2,B$;A$;
ELSE
PRINT #2,A$;
END IF
NEXT I
CLOSE #1
CLOSE #2